.class public Lcom/waiqin365/lightapp/chexiao/a/z;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/ArrayList;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .locals 0

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p1, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    return-void
.end method


# virtual methods
.method public a(Ljava/util/ArrayList;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6

    const/4 v5, 0x0

    if-nez p2, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->a:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030024

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v1, Lcom/waiqin365/lightapp/chexiao/a/aa;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/chexiao/a/aa;-><init>(Lcom/waiqin365/lightapp/chexiao/a/z;)V

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v0, 0x7f0c00e7

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->a:Landroid/widget/TextView;

    const v0, 0x7f0c00e6

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    const v0, 0x7f0c00e8

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->c:Landroid/widget/TextView;

    const v0, 0x7f0c00e9

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->d:Landroid/view/View;

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/am;

    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->a:Landroid/widget/TextView;

    iget-object v3, v0, Lcom/waiqin365/lightapp/kehu/b/am;->d:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget v2, v0, Lcom/waiqin365/lightapp/kehu/b/am;->p:I

    if-ltz v2, :cond_2

    iget v2, v0, Lcom/waiqin365/lightapp/kehu/b/am;->p:I

    const/16 v3, 0xbb8

    if-le v2, v3, :cond_1

    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    const-string/jumbo v3, ">3km"

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_1
    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    invoke-virtual {v2, v5}, Landroid/widget/TextView;->setVisibility(I)V

    :goto_2
    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/am;->f:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_4

    iget-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->c:Landroid/widget/TextView;

    iget-object v2, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->a:Landroid/content/Context;

    const v3, 0x7f080577

    invoke-virtual {v2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_3
    iget-object v0, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->d:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v2, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->b:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    if-ne p1, v2, :cond_5

    invoke-virtual {v0, v5, v5, v5, v5}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    :goto_4
    iget-object v1, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->d:Landroid/view/View;

    invoke-virtual {v1, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    return-object p2

    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/chexiao/a/aa;

    move-object v1, v0

    goto :goto_0

    :cond_1
    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    iget v4, v0, Lcom/waiqin365/lightapp/kehu/b/am;->p:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "m"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    :cond_2
    iget-object v2, v0, Lcom/waiqin365/lightapp/kehu/b/am;->i:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_3

    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->a:Landroid/content/Context;

    const v4, 0x7f08059b

    invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    invoke-virtual {v2, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_2

    :cond_3
    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->b:Landroid/widget/TextView;

    const/4 v3, 0x4

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_2

    :cond_4
    iget-object v2, v1, Lcom/waiqin365/lightapp/chexiao/a/aa;->c:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/am;->f:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_3

    :cond_5
    iget-object v2, p0, Lcom/waiqin365/lightapp/chexiao/a/z;->a:Landroid/content/Context;

    const/high16 v3, 0x41400000    # 12.0f

    invoke-static {v2, v3}, Lcom/fiberhome/gaea/client/d/k;->b(Landroid/content/Context;F)I

    move-result v2

    invoke-virtual {v0, v2, v5, v5, v5}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    goto :goto_4
.end method
